package com.luhuiguo.cms.shared.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;

import com.extjs.gxt.ui.client.data.BeanModelTag;

public class ArticleModel implements BeanModelTag, Serializable {

    private static final long serialVersionUID = -3011990456241035679L;

    public static final int ABANDONED = -2;

    public static final int DRAFT = -1;

    public static final int PENDING = 0;

    public static final int APPROVED = 1;

    public static final int PUBLISHED = 2;

    private Long id;

    private Long channelId;

    private String title;

    private String subject;

    private String url;

    private String author;

    private String editor;

    private String source;

    private String keywords;

    private String description;

    private String summary;

    private String content;

    private int rank;

    private int grade;

    private boolean allowComment;

    private int clicks;

    private int buzzUp;

    private int buzzDown;

    private Date publishDate;

    private Date expiredDate;

    private int status;

    private Date created;

    private String createdBy;

    private Date lastModified;

    @Basic
    private String lastModifiedBy;

    public ArticleModel() {
    }

    public ArticleModel(Long channelId, String title, String subject, String author, String source, String keywords,
            String description, String summary, String content) {
        this.channelId = channelId;
        this.title = title;
        this.subject = subject;
        this.author = author;
        this.source = source;
        this.keywords = keywords;
        this.description = description;
        this.summary = summary;
        this.content = content;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getChannelId() {
        return channelId;
    }

    public void setChannelId(Long channelId) {
        this.channelId = channelId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getKeywords() {
        return keywords;
    }

    public void setKeywords(String keywords) {
        this.keywords = keywords;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getRank() {
        return rank;
    }

    public void setRank(int rank) {
        this.rank = rank;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getEditor() {
        return editor;
    }

    public void setEditor(String editor) {
        this.editor = editor;
    }

    public int getGrade() {
        return grade;
    }

    public void setGrade(int grade) {
        this.grade = grade;
    }

    public boolean isAllowComment() {
        return allowComment;
    }

    public void setAllowComment(boolean allowComment) {
        this.allowComment = allowComment;
    }

    public int getClicks() {
        return clicks;
    }

    public void setClicks(int clicks) {
        this.clicks = clicks;
    }

    public int getBuzzUp() {
        return buzzUp;
    }

    public void setBuzzUp(int buzzUp) {
        this.buzzUp = buzzUp;
    }

    public int getBuzzDown() {
        return buzzDown;
    }

    public void setBuzzDown(int buzzDown) {
        this.buzzDown = buzzDown;
    }

    public Date getExpiredDate() {
        return expiredDate;
    }

    public void setExpiredDate(Date expiredDate) {
        this.expiredDate = expiredDate;
    }

    public Date getPublishDate() {
        return publishDate;
    }

    public void setPublishDate(Date publishDate) {
        this.publishDate = publishDate;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    public Date getLastModified() {
        return lastModified;
    }

    public void setLastModified(Date lastModified) {
        this.lastModified = lastModified;
    }

    public String getLastModifiedBy() {
        return lastModifiedBy;
    }

    public void setLastModifiedBy(String lastModifiedBy) {
        this.lastModifiedBy = lastModifiedBy;
    }

    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append("ArticleModel [id=").append(id).append(", title=").append(title).append("]");
        return builder.toString();
    }

}
